from libs.ZScene import ZScene
from project.res.glo import players
from project.res.src import src


class GameScene ( ZScene ) :
    def __init__ ( self ) :
        super ( GameScene , self ).__init__ ( )
        self.player = players
        self.loadmap ( )
        self.loaditem ( )
        self.loadplayer ( )
        self.loadui ( )
        self.msg_layer ( )

    def loadmap ( self ) :
        from project.scenes.GameScene.layers.MapLayer import MapLayer
        self.add ( MapLayer ( self , src.map [ 0 ] ) )

    def loaditem ( self ) :
        pass

    def loadplayer ( self ) :
        pass

    def loadui ( self ) :
        pass

    def change_map ( self , filename ) :
        from project.scenes.GameScene.layers.MapLayer import MapLayer
        self.children [ 0 ] = MapLayer ( self , filename )

    def update ( self , event , keys , m_keys , m_pos ) :
        super ( GameScene , self ).update ( event , keys , m_keys , m_pos )
        # if m_keys :
        #     self.change_map( src.map [ 1 ] )
